﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewSchedule.aspx.cs" Inherits="SWEN_HMS.StaffHousekeepingModule.ViewSchedule" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">


        .auto-style2
        {
            width: 100%;
        }
        .auto-style4
        {
            width: 198px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="auto-style2">
        <tr>
            <td class="auto-style4">View Housekeeping Schedule By...</td>
            <td>
                <asp:DropDownList ID="viewByDropDown" runat="server" AutoPostBack="True" OnSelectedIndexChanged="viewByDropDown_SelectedIndexChanged" Width="150px">
                    <asp:ListItem Selected="True">Please select...</asp:ListItem>
                    <asp:ListItem>Day</asp:ListItem>
                    <asp:ListItem>Staff</asp:ListItem>
                    <asp:ListItem>Room</asp:ListItem>
                    <asp:ListItem>Housekeeping Role</asp:ListItem>
                </asp:DropDownList>
                &nbsp;&nbsp;
                <asp:DropDownList ID="viewByDayDropDown" runat="server" AutoPostBack="True" Enabled="False" OnSelectedIndexChanged="viewByDayDropDown_SelectedIndexChanged" Visible="False" Width="100px">
                    <asp:ListItem>Monday</asp:ListItem>
                    <asp:ListItem>Tuesday</asp:ListItem>
                    <asp:ListItem>Wednesday</asp:ListItem>
                    <asp:ListItem>Thursday</asp:ListItem>
                    <asp:ListItem>Friday</asp:ListItem>
                    <asp:ListItem>Saturday</asp:ListItem>
                    <asp:ListItem>Sunday</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="viewByStaffDropDown" runat="server" AutoPostBack="True" Enabled="False" OnSelectedIndexChanged="viewByStaffDropDown_SelectedIndexChanged" Visible="False" Width="100px">
                </asp:DropDownList>
                <asp:DropDownList ID="viewByRoomDropDown" runat="server" AutoPostBack="True" Enabled="False" OnSelectedIndexChanged="viewByRoomDropDown_SelectedIndexChanged" Visible="False" Width="100px">
                </asp:DropDownList>
                &nbsp;<asp:DropDownList ID="viewByHousekeepingRoleDropDown" runat="server" AutoPostBack="True" OnSelectedIndexChanged="viewByHousekeepingRoleDropDown_SelectedIndexChanged" Width="200px">
                    <asp:ListItem>General Maintenance</asp:ListItem>
                    <asp:ListItem>Room Maintenance</asp:ListItem>
                    <asp:ListItem>Estate Maintenance</asp:ListItem>
                    <asp:ListItem>Security</asp:ListItem>
                </asp:DropDownList>
                &nbsp;<asp:DropDownList ID="viewByHousekeepingRoleStaffIDDropDown" runat="server" AutoPostBack="True" OnSelectedIndexChanged="viewByHousekeepingRoleStaffIDDropDown_SelectedIndexChanged" Width="100px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="auto-style3" colspan="2">
                <asp:Label ID="outcomeLabel" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:MultiView ID="viewStaffScheduleMultiView" runat="server">
                    <asp:View ID="viewScheduleByDayMV" runat="server">
                        View Housekeeping Schedule by Day :
                        <asp:Label ID="selectedDayLabel" runat="server"></asp:Label>
                        <br />
                        <asp:GridView ID="viewScheduleByDayGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="housekeepingID" OnRowDeleting="DeleteSchedule" style="margin-bottom: 0px" Width="800px">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="housekeepingID" DataNavigateUrlFormatString="~/StaffHousekeepingModule/UpdateSchedule.aspx?hkID={0}" DataTextField="housekeepingID" HeaderText="Schedule/Housekeeping ID" SortExpression="housekeepingID" />
                                <asp:TemplateField HeaderText="Staff ID">
                                    <ItemTemplate>
                                        <%#Eval("staffID") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Room Number">
                                    <ItemTemplate>
                                        <%#Eval("roomNo") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Duty Date Time">
                                    <ItemTemplate>
                                        <%#Eval("dutyDateTime") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Remarks">
                                    <ItemTemplate>
                                        <%#Eval("remarks") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/image/dustbin.png" HeaderText="Delete" ShowDeleteButton="true" />
                            </Columns>
                        </asp:GridView>
                    </asp:View>
                    <asp:View ID="viewScheduleByStaffMV" runat="server">
                        View Housekeeping Schedule by Staff :
                        <asp:Label ID="selectedStaffIDLabel" runat="server"></asp:Label>
                        &nbsp;-
                        <asp:Label ID="selectedStaffNameLabel" runat="server"></asp:Label>
                        <br />
                        Staff Position: &nbsp;<asp:Label ID="stfPositionForViewByStaffLabel" runat="server"></asp:Label>
                        <asp:GridView ID="viewScheduleByStaffGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="housekeepingID" OnRowDeleting="DeleteSchedule1" style="margin-bottom: 0px" Width="800px">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="housekeepingID" DataNavigateUrlFormatString="~/StaffHousekeepingModule/UpdateSchedule.aspx?hkID={0}" DataTextField="housekeepingID" HeaderText="Schedule/Housekeeping ID" SortExpression="housekeepingID" />
                                <asp:TemplateField HeaderText="Staff ID">
                                    <ItemTemplate>
                                        <%#Eval("staffID") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Room Number">
                                    <ItemTemplate>
                                        <%#Eval("roomNo") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Duty Date Time">
                                    <ItemTemplate>
                                        <%#Eval("dutyDateTime") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Remarks">
                                    <ItemTemplate>
                                        <%#Eval("remarks") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/image/dustbin.png" HeaderText="Delete" ShowDeleteButton="true" />
                            </Columns>
                        </asp:GridView>
                    </asp:View>
                    <asp:View ID="viewScheduleByRoomMV" runat="server">
                        View Housekeeping Schedule by Room :
                        <asp:Label ID="selectedRoomLabel" runat="server"></asp:Label>
                        <asp:GridView ID="viewScheduleByRoomGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="housekeepingID" OnRowDeleting="DeleteSchedule2" style="margin-bottom: 0px" Width="800px">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="housekeepingID" DataNavigateUrlFormatString="~/StaffHousekeepingModule/UpdateSchedule.aspx?hkID={0}" DataTextField="housekeepingID" HeaderText="Schedule/Housekeeping ID" SortExpression="housekeepingID" />
                                <asp:TemplateField HeaderText="Staff ID">
                                    <ItemTemplate>
                                        <%#Eval("staffID") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Room Number">
                                    <ItemTemplate>
                                        <%#Eval("roomNo") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Duty Date Time">
                                    <ItemTemplate>
                                        <%#Eval("dutyDateTime") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Remarks">
                                    <ItemTemplate>
                                        <%#Eval("remarks") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/image/dustbin.png" HeaderText="Delete" ShowDeleteButton="true" />
                            </Columns>
                        </asp:GridView>
                    </asp:View>
                    <asp:View ID="viewScheduleByHousekeepingRolesMV" runat="server">
                        View Housekeeping Schedule by Housekeeping Role:
                        <asp:Label ID="selectedHousekeepingRoleLabel" runat="server"></asp:Label>
                        <br />
                        Staff Name:
                        <asp:Label ID="selectedStaffNameForViewByHousekeepingRolesLabel" runat="server"></asp:Label>
                        &nbsp;(Staff ID:&nbsp;<asp:Label ID="selectedHousekeepingStaffIDLabel" runat="server"></asp:Label>
                        )
                        <asp:GridView ID="viewScheduleByHousekeepingRoleGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="housekeepingID" OnRowDeleting="DeleteSchedule3" style="margin-bottom: 0px" Width="800px">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="housekeepingID" DataNavigateUrlFormatString="~/StaffHousekeepingModule/UpdateSchedule.aspx?hkID={0}" DataTextField="housekeepingID" HeaderText="Schedule/Housekeeping ID" SortExpression="housekeepingID" />
                                <asp:TemplateField HeaderText="Staff ID">
                                    <ItemTemplate>
                                        <%#Eval("staffID") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Room Number">
                                    <ItemTemplate>
                                        <%#Eval("roomNo") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Duty Date Time">
                                    <ItemTemplate>
                                        <%#Eval("dutyDateTime") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Remarks">
                                    <ItemTemplate>
                                        <%#Eval("remarks") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/image/dustbin.png" HeaderText="Delete" ShowDeleteButton="true" />
                            </Columns>
                        </asp:GridView>
                    </asp:View>
                </asp:MultiView>
                <asp:Button ID="addScheduleButton" runat="server" CssClass="btnCSS" OnClick="addScheduleButton_Click" Text="Add Housekeeping Schedule" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" runat="server" contentplaceholderid="pageTitlePHolder">
    <span class="auto-style1" style="color: #000000">View Housekeeping Schedule</span>
</asp:Content>

